//workbook.js
import React, { Component } from 'react';
import WorksheetView from './worksheetView';
export default class WorkbookView extends Component {
    componentDidMount(){
        this.props.onRef(this)  //这个就是把自身传给调用者
    }

    workSheetViewRef=(ref)=>{
        this.workSheetView = ref
    }

    render() {
        let _reportId=this.props.reportId;
        let _accountSetId=this.props.accountSetId;
        let _year=this.props.year;
        let _month=this.props.month;
        let _orgName=this.props.orgName;
        let _reportDate=this.props.reportDate;
        let _reportNo=this.props.reportNo;
        let _lister=this.props.lister;
        let _auditor=this.props.auditor;
        let _way=this.props.way;
        let _reportInstanceId=this.props.reportInstanceId;
        return (
            <div className="workbook">
                <div className="worksheet">
                    <WorksheetView onRef={this.workSheetViewRef}
                                   reportId={_reportId}
                                   accountSetId={_accountSetId}
                                   year={_year}
                                   month={_month}
                                   orgName={_orgName}
                                   reportDate={_reportDate}
                                   reportNo={_reportNo}
                                   lister={_lister}
                                   auditor={_auditor}
                                   way={_way}
                                   reportInstanceId={_reportInstanceId}
                    />

                </div>
            </div>
        )
    }
}
